package cn.zan;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/5/7 14:23
 */
public class SingleObjectTest {
    public static void main(String[] args) {
        //编译报错 构造函数 SingleObject() 是不可见的
        //SingleObject singleObject = new SingleObject();
        //获取唯一可用的对象
        SingleObject singleObject = SingleObject.getInstance();

        //调用方法
        singleObject.showMessage();
    }
}
